{% extends 'admin/base.html' %}

{% block title %}
    基本信息
{% endblock %}

{% block admin_content %}
    <div class="row">
        <div class="col-md-1"></div>
        <div class="col-md-10">
            <div class="panel">
                <div class="panel-heading">
                    <h3 class="panel-title">基本信息</h3>
                </div>
                <div class="panel-body">
                    <div class="entry-box custom-blog">
                        <div class="blog-info-box">
                            <h4 class="info-header"><strong>博客标题：</strong></h4>
                            <p><i>{{ BlogInfo.query.first().title }}</i></p>
                            <h4 class="info-header"><strong>个性签名：</strong></h4>
                            <p><i>{{ BlogInfo.query.first().signature }}</i></p>
                            <h4 class="info-header"><strong>导航样式：</strong></h4>
                            <p>
                                <i>
                                    {% if BlogInfo.query.first().navbar == 'inverse' %}
                                        魅力黑
                                    {% else %}
                                        优雅白
                                    {% endif %}
                                </i>
                            </p>
                            <div class="add-articleType-nav">
                                <a class="btn btn-sm btn-primary blog-info-btn" id="editBlogInfo"
                                   onclick="get_blog_info('{{ url_for('others.get_blog_info') }}')">
                                    <span class="glyphicon glyphicon-edit"></span>
                                    修改
                                </a>
                            </div>
                        </div>
                    </div>

                    <!-- 信息删除确认: For edit blog info form-->
                    <div class="modal fade" id="editBlogInfoFormModal">
                        <div class="modal-dialog">
                            <div class="modal-content message_align">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                            aria-hidden="true">×</span></button>
                                    <h4 class="modal-title">修改基本信息</h4>
                                </div>
                                <form id="editBlogInfoForm" method="post" action="" class="form-body">
                                    <div class="modal-body">
                                            {{ form.csrf_token }}
                                        <div class="form-group">
                                            {{ form.title.label }}
                                            {{ form.title(class='form-control', required='') }}
                                        </div>
                                        <div class="form-group">
                                            {{ form.signature.label }}
                                            {{ form.signature(class='form-control', required='') }}
                                        </div>
                                        <div class="form-group">
                                            {{ form.navbars.label }}
                                            {{ form.navbars(class='form-control', required='') }}
                                        </div>
                                    </div>
                                    <div class="modal-footer">
                                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                                        <button id="editblogInfoCfmClick" type="submit" class="btn btn-success">确定
                                        </button>
                                    </div>
                                </form>
                            </div><!-- /.modal-content -->
                        </div><!-- /.modal-dialog -->
                    </div><!-- /.modal -->
                </div>
            </div>
        </div>
    </div>

{% endblock %}